//
//  ClockSettingController.swift
//  Pomodoro
//
//  Created by zhengju on 2018/3/1.
//  Copyright © 2018年 zhengju. All rights reserved.
//时钟设置

import UIKit

class ClockSettingController: UIViewController {

    var tableView : UITableView!
    var pickerView : UIPickerView!
    var absorbedDatas = ["5分钟","15分钟","25分钟","35分钟","45分钟","60分钟"]//专注
    var restDatas = ["15分钟","25分钟","35分钟"]//休息
    
    var absorbedTitle = "5分钟"
    var restTitle = "15分钟"
    var leftTitles = ["专注间隔","休息间隔"]

    var isAbsorbed = true
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.title = "时钟设置"
        self.view.backgroundColor  = UIColor.white
        self.navigationItem.rightBarButtonItem = UIBarButtonItem.init(title: "完成", style: .plain, target: self, action: #selector(rightBarAction))
        
        initUI()
        
    }
 
    func initUI() {
        
        
        tableView = UITableView.init(frame: CGRect.init(x: 0, y: 0, width: SCREEN_WIDTH, height: 200))
        tableView.delegate = self
        tableView.dataSource = self
        tableView.isScrollEnabled = false
        tableView.register(ClockSettingCell.classForCoder(), forCellReuseIdentifier: "cell")
        tableView.tableFooterView = UIView()
        self.view.addSubview(tableView)
        
        
        pickerView = UIPickerView.init(frame: CGRect.init(x: 0, y: 200, width: SCREEN_WIDTH, height: 300))
        pickerView.dataSource = self
        pickerView.delegate = self
        self.view.addSubview(pickerView)
    }
    @objc func rightBarAction() {
        self.navigationController?.popViewController(animated: true)
    }
    
}
